package mock.service.impl
{
	import mock.service.BarService;
	import mock.service.FooService;
	import mock.service.HogeService;
	
	public class HogeServiceImpl implements HogeService
	{
		private var _fooArray:Array;
		private var _barService:BarService;

		public var _init1Invoke:Boolean;
		public var _init2Invoke:Boolean;
		public function init1():void{
			_init1Invoke = true;
		}
		public function init2():void{
			_init2Invoke = true;
		}
		public function set fooArray(value:Array):void{
			_fooArray = value;
		}
		public function set barService(value:BarService):void{
			_barService = value;
		}
		public function initialized():Boolean{
			return _init1Invoke && _init2Invoke;
		}
		
		public function executeHoge():String{
			return FooService(_fooArray[0]).executeFoo() +
					FooService(_fooArray[1]).executeFoo() +				
					 _barService.executeBar();
		}
	}
}